/*
 * Copyright 2012-2020 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.gitee.thghh.dynamic.liquibase.configuration;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import io.gitee.thghh.dynamic.liquibase.liquibase.DynamicSpringLiquibase;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * Configuration properties to configure {@link DynamicSpringLiquibase}.
 *
 * @author Marcel Overdijk
 * @author Eddú Meléndez
 * @author Ferenc Gratzer
 * @author Evgeniy Cheban
 * @since 1.1.0
 */
@Getter
@Setter
@ConfigurationProperties(prefix = DynamicLiquibaseProperties.PREFIX)
public class DynamicLiquibaseProperties {

	/** 配置前缀 */
	public static final String PREFIX = "spring.liquibase.dynamic";

	/**
	 * Whether to enable Liquibase support.
	 */
	private boolean enabled = true;

	/** liquibase属性配置 */
	private Map<String, LiquibaseProperties> datasource = new LinkedHashMap<>();
}
